<?php
/**
 * Created by PhpStorm.
 * User: Vova
 * Date: 9/26/14
 * Time: 9:21 PM
 */


define('SMARTY_DIR', 'C:/xampp/htdocs/door-market/Smarty-3.1.19/libs/');
require_once('C:/xampp/htdocs/door-market/php/classes/db.class.php');

require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();


$smarty->template_dir = 'C:/xampp/htdocs/door-market/templates/';
$smarty->compile_dir  = 'C:/xampp/htdocs/door-market/templates_c';


$temp_items =array();
$item = array(
    "product_name" => "test_name",
    "product_code" => "test-code",
    "link_to_detail" => "#",
    "large_image" => "",
    "mid_image" => ""
);
$items_line = array();
array_push($items_line,$item);
array_push($items_line,$item);
array_push($items_line,$item);


array_push($temp_items,$items_line);

array_push($temp_items,$items_line);

array_push($temp_items,$items_line);



 db::getInstance()->test();

$category = "";
$page_number = 1;
$page_size = 10;

/*

$smarty->assign('items_container',$temp_items);

$smarty->display('content.tpl');




*/

$items = db::getInstance()->get_catalog_items_for_page($category,$page_number,$page_size);

$smarty->assign('items_container',$items);

$smarty->display('content.tpl');

echo "<br>-----------------------------------------<br>";

echo "<pre>";
var_dump($items);
echo "<br>-----------------------------------------<br>";




?>